package login;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import struts.action.Action;
import struts.form.ActionForm;

public class UserAction implements Action {

	public String excute(HttpServletRequest request,ActionForm form,Map<String, String> actionForward){
		String url = "failed";
		UserForm user = (UserForm)form;
		if ("xiaoming".equals(user.getUsername()) && "123456".equals(user.getPassword())) {
			url = "success";
		}
		return actionForward.get(url);
	}
}
